<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 基本数据类型
        // string number undefined boole null symbol


        // 引用数据类型
        // object array function

        // typeof 语句
        var num = "123";
        console.log(num);
        console.log(typeof num);// number
        console.log(typeof "hello world"); //string
        console.log(typeof true);// boolean
        console.log(typeof Symbol());// symbol 
        console.log(typeof null);// object 单独记忆
        console.log(typeof undefined);// underfined

        console.log(typeof {}, "7.0"); //object
        console.log(typeof [], "8.0"); //object 通过typeof 检测 array, 返回object

        // 有两种方式检测数组：
        //1.Array.isArray()
        // 2.instanceof 通过实例(具体的数据) 判断数组是否为array

        console.log(typeof function () { }); //function
        var foo = function () { };
        console.log(typeof foo);// function




        // 作用：控制台上输出日志信息
        // console.log(变量);
    </script>
</body>

</html>